/**
 * @project readnote
 * @Title SellSelfMailService.java
 * @author huxh
 * @date 2012-2-12
 **/
package com.readnote.sellselfmail.service;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import com.cr.backbone.hibenate.AppBaseService;
import com.cr.backbone.util.UtilsDataDict;
import com.cr.backbone.util.UtilsDateTime;
import com.cr.backbone.util.UtilsThreadPoolSendMail;
import com.readnote.sellselfmail.model.SellSelfMail;

public interface SellSelfMailService extends AppBaseService<SellSelfMail> {
	

	
	/**
	 * 保存申请记录
	 * @param sellSelfMail
	 * @return
	 * @author huxh
	 * @date 2012-7-2
	 */
	public Long saveSellSelfMail(SellSelfMail sellSelfMail);


	/**
	 * 执行发送，并更新累计次数
	 * @param sellSelfMail
	 * @return
	 * @author huxh
	 * @date 2012-7-2
	 */
	public Long updateSellSelfMailCount(SellSelfMail sellSelfMail) ;
	
	/**
	 * 定时发送简历
	 * 	1、查询处于申请中明细
	 *  2、检测是否符合当前条件
	 *  3、执行发送
	 * @author huxh
	 * @date 2012-7-2
	 */
	public void saveSendSellSelfMail() ;
	
	/**
	 * 
	 * @return
	 * @author huxh
	 * @date 2012-7-2 
	 */
	public boolean isWorkDay() ;


	/**
	 * 
	 * @param sends
	 * @author huxh
	 * @date 2012-7-2 
	 */
	public void sendMialsBySells(List<SellSelfMail> sends) ;


	/**
	 * 是否符合发送条件
	 * @param sell
	 * @return
	 * @author huxh
	 * @date 2012-7-2 
	 */
	public boolean canSendSell(SellSelfMail sell) ;


	/**
	 * 更新频率
	 * @author huxh
	 * @date 2012-7-2
	 */
	public void updateSendSellFace() ;
	
	/**
	 * 
	 * 
	 * @param sellSelfMail
	 * @author huxh
	 * @date 2012-7-2
	 */
	public void updateSellSendClose(SellSelfMail sellSelfMail);
	
	/**
	 * 检测是否，当前操作者为人事经理
	 * @param sellSelfMail
	 * @param email
	 * @return
	 * @author huxh
	 * @date 2012-7-2
	 */
	public boolean isHumanResourcesMail(SellSelfMail sellSelfMail,String email) ;
	
}
